<include file="public:top" username="username"/>
<div class="container">
	<div class="maincontent">
		<h3 class="pull-left">
			<i class="glyphicon glyphicon-book"></i>
			班级文章<small>Class dynamics</small>
		</h3>
		<div class="pull-right addButton">
			<a class="" href="<?php echo Url::articleList();?>">返回留言列表</a>
		</div>
		<div class="clear"></div>
		<div class='hr'></div>
		<p style="text-align:center;"><strong>{{$acontent.ar_title}}</strong></p>
		<div>
			<strong style="margin-right:20px;">发表人:{{$acontent.u_name}}</strong>
			<strong style="margin-right:20px;">发表时间:{{$acontent.ar_date|date='Y-m-d', ###}}</strong>
			<if condition="$count gt 0">
				<strong>评论（{{$count}}）</strong>
			</if>
		</div>
		<div class="content">{{$acontent.ar_content}}</div>
		<ul class="pager">
		    <notempty name="lastRecord">
	            <li>
	                <a href="<?php echo Url::articleDetail($lastRecord);?>">上一条</a>
	            </li>
			<span class="pageSpace"></span>
			</notempty>
			<notempty name="nextRecord">
				<li>
				    <a href="<?php echo Url::articleDetail($nextRecord);?>">下一条</a>
				</li>
			</notempty>
		</ul>
		<div class="hr"></div>
		<!------评论开始------>
		<notempty name='isHasReply'>
		    <div >
				<form action="__URL__/addmessage" method="post" />
					<h4><strong>发表评论:</strong></h4>
					<div class="form-group">
						<textarea id="mcontent" name="mcontent" class="form-control" placeholder="留下你的足迹" rows="4"></textarea>
						<input type="hidden" id="aid" name="aid" value="{{$acontent.ar_id}}"/>
					</div>
					<div class="form-group text-right">
					    <input type="submit" class="btn btn-default" value="发表评论" />
				    </div>
			    </form>
		    </div>
		</notempty>
		<!------评论结束------>
		<if condition="$count gt 0">
			<h4><strong>评论:</strong></h4>
			<div class="hr"></div>
			<!-----评论列表开始-------->
			<foreach name="wmessage" item="mo" key="key">
				<div class="row-space">
					<div class="col-md-1">
						<img class="img-rounded img-size" src="__PUBLIC__/photos/s_{{$mo.u_image}}"/>
					   	<div>{{$mo.uname}}</div>
					</div>
					<div class="col-md-9">
						<div>第{{$key+1}}楼  {{$mo.zb_date}}</div>
						<div>{{$mo.zb_content}}</div>
					</div>
					<div class="clear"></div>
				</div>
				<div class="hr"></div>
			</foreach>
			<!---------评论列表结束-------->
			<div class="margin-bottom">{{$page}}</div>
		</if>
	</div>
</div>
</div>
<include file="public:footer"/>
